import { reqGetSearchInfo } from "@/api"

const actions={
  async  getSearchList(context,seachParams){
     let result = await reqGetSearchInfo(seachParams)
     if(result.code==200){
        context.commit('GETSEARCHLIST',result.data)
     }
    }
}
const mutations={
    GETSEARCHLIST(state,searchList){
        state.searchList=searchList
    }
}
const state ={
    searchList:{}
}
const getters={
    attrsList(state){
        return  state.searchList.attrsList|| []
    },
    goodsList(state){
        return  state.searchList.goodsList
    },
    trademarkList(state){
        return  state.searchList.trademarkList
    }
}

export default {
     
    actions,
    mutations,
    state,getters
}